﻿using DataAchive.Model.Excel.Export;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAchive.Extend
{
    //主分类不知 且每个机台配置会有差别，
    public class AiDefectStaticsReportAll
    {
        //行列报表同一个组件已经去重
        public static AiDefectStaticViewModel GetReportData(List<ColRowReport> heBingReport)
        {
            AiDefectStaticViewModel aiDefectStaticViewModel = new AiDefectStaticViewModel();

            List<string> allfaults = new List<string>();

            aiDefectStaticViewModel.ProductCount = heBingReport.Count;
            aiDefectStaticViewModel.OKCount = heBingReport.Count(x => x.HumanJudgeTime == TimeSpan.Zero);
            aiDefectStaticViewModel.NGCount = aiDefectStaticViewModel.ProductCount - aiDefectStaticViewModel.OKCount;

            foreach (var xiangshu in heBingReport)
            {
               var item_el = xiangshu.ElAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
               var item_vi = xiangshu.ViAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
               var item_vB = xiangshu.VBAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                /*
                汇流条检
       焊带偏移,焊带过长,焊带过短,焊带缺失,焊带虚焊,   焊带弯曲 , 汇流条缺失, 汇流条偏移      ,爬电距离,焊带异常,EVA膜偏移
       焊带未焊接
       方阵偏移
                */

                // 焊带偏移
                if (item_el.Contains("焊带偏移"))
                {
                    aiDefectStaticViewModel.HanDaiPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiPianYi++;
                    }
                }
                if (item_vi.Contains("焊带偏移"))
                {
                    aiDefectStaticViewModel.HanDaiPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiPianYi++;
                    }
                }
                if (item_vB.Contains("焊带偏移"))
                {
                    aiDefectStaticViewModel.HanDaiPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiPianYi++;
                    }
                }


                // 焊带过长
                if (item_el.Contains("焊带过长"))
                {
                    aiDefectStaticViewModel.HanDaiGuoChang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoChang++;
                    }
                }
                if (item_vi.Contains("焊带过长"))
                {
                    aiDefectStaticViewModel.HanDaiGuoChang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoChang++;
                    }
                }
                if (item_vB.Contains("焊带过长"))
                {
                    aiDefectStaticViewModel.HanDaiGuoChang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoChang++;
                    }
                }

                // 焊带过短
                if (item_el.Contains("焊带过短"))
                {
                    aiDefectStaticViewModel.HanDaiGuoDuan++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoDuan++;
                    }
                }
                if (item_vi.Contains("焊带过短"))
                {
                    aiDefectStaticViewModel.HanDaiGuoDuan++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoDuan++;
                    }
                }
                if (item_vB.Contains("焊带过短"))
                {
                    aiDefectStaticViewModel.HanDaiGuoDuan++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiGuoDuan++;
                    }
                }
                // 焊带缺失
                if (item_el.Contains("焊带缺失"))
                {
                    aiDefectStaticViewModel.HanDaiQueShi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiQueShi++;
                    }
                }
                if (item_vi.Contains("焊带缺失"))
                {
                    aiDefectStaticViewModel.HanDaiQueShi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiQueShi++;
                    }
                }
                if (item_vB.Contains("焊带缺失"))
                {
                    aiDefectStaticViewModel.HanDaiQueShi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiQueShi++;
                    }
                }
                // 焊带虚焊
                if (item_el.Contains("焊带虚焊"))
                {
                    aiDefectStaticViewModel.HanDaiXuHan++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiXuHan++;
                    }
                }
                if (item_vi.Contains("焊带虚焊"))
                {
                    aiDefectStaticViewModel.HanDaiXuHan++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiXuHan++;
                    }
                }
                if (item_vB.Contains("焊带虚焊"))
                {
                    aiDefectStaticViewModel.HanDaiXuHan++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiXuHan++;
                    }
                }
                // 焊带弯曲
                if (item_el.Contains("焊带弯曲"))
                {
                    aiDefectStaticViewModel.HanDaiWanQu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWanQu++;
                    }
                }
                if (item_vi.Contains("焊带弯曲"))
                {
                    aiDefectStaticViewModel.HanDaiWanQu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWanQu++;
                    }
                }
                if (item_vB.Contains("焊带弯曲"))
                {
                    aiDefectStaticViewModel.HanDaiWanQu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWanQu++;
                    }
                }
                // 汇流条缺失
                if (item_el.Contains("汇流条缺失"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoQueShi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoQueShi++;
                    }
                }
                if (item_vi.Contains("汇流条缺失"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoQueShi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoQueShi++;
                    }
                }
                if (item_vB.Contains("汇流条缺失"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoQueShi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoQueShi++;
                    }
                }
                // 汇流条偏移
                if (item_el.Contains("汇流条偏移"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoPianYi++;
                    }
                }
                if (item_vi.Contains("汇流条偏移"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoPianYi++;
                    }
                }
                if (item_vB.Contains("汇流条偏移"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuiLiuTiaoPianYi++;
                    }
                }
                // 爬电距离
                if (item_el.Contains("爬电距离"))
                {
                    aiDefectStaticViewModel.PaDianJuLi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePaDianJuLi++;
                    }
                }
                if (item_vi.Contains("爬电距离"))
                {
                    aiDefectStaticViewModel.PaDianJuLi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePaDianJuLi++;
                    }
                }
                if (item_vB.Contains("爬电距离"))
                {
                    aiDefectStaticViewModel.PaDianJuLi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePaDianJuLi++;
                    }
                }
                // 焊带异常
                if (item_el.Contains("焊带异常"))
                {
                    aiDefectStaticViewModel.HanDaiYiChang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiYiChang++;
                    }
                }
                if (item_vi.Contains("焊带异常"))
                {
                    aiDefectStaticViewModel.HanDaiYiChang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiYiChang++;
                    }
                }
                if (item_vB.Contains("焊带异常"))
                {
                    aiDefectStaticViewModel.HanDaiYiChang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiYiChang++;
                    }
                }
                // EVA膜偏移
                if (item_el.Contains("EVA膜偏移"))
                {
                    aiDefectStaticViewModel.EVAMoPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneEVAMoPianYi++;
                    }
                }
                if (item_vi.Contains("EVA膜偏移"))
                {
                    aiDefectStaticViewModel.EVAMoPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneEVAMoPianYi++;
                    }
                }
                if (item_vB.Contains("EVA膜偏移"))
                {
                    aiDefectStaticViewModel.EVAMoPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneEVAMoPianYi++;
                    }
                }
                // 焊带未焊接
                if (item_el.Contains("焊带未焊接"))
                {
                    aiDefectStaticViewModel.HanDaiWeiHanJie++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWeiHanJie++;
                    }
                }
                if (item_vi.Contains("焊带未焊接"))
                {
                    aiDefectStaticViewModel.HanDaiWeiHanJie++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWeiHanJie++;
                    }
                }
                if (item_vB.Contains("焊带未焊接"))
                {
                    aiDefectStaticViewModel.HanDaiWeiHanJie++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHanDaiWeiHanJie++;
                    }
                }
                // 方阵偏移
                if (item_el.Contains("方阵偏移"))
                {
                    aiDefectStaticViewModel.FangZhenPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneFangZhenPianYi++;
                    }
                }
                if (item_vi.Contains("方阵偏移"))
                {
                    aiDefectStaticViewModel.FangZhenPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneFangZhenPianYi++;
                    }
                }
                if (item_vB.Contains("方阵偏移"))
                {
                    aiDefectStaticViewModel.FangZhenPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneFangZhenPianYi++;
                    }
                }
                /* 叠焊背面检：片间距、串间距、缺角、破片、焊带偏移、玻璃异物、异物 */
                // 片间距
                if (item_el.Contains("片间距"))
                {
                    aiDefectStaticViewModel.PianJianJu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePianJianJu++;
                    }
                }
                if (item_vi.Contains("片间距"))
                {
                    aiDefectStaticViewModel.PianJianJu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePianJianJu++;
                    }
                }
                if (item_vB.Contains("片间距"))
                {
                    aiDefectStaticViewModel.PianJianJu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePianJianJu++;
                    }
                }
                // 串间距
                if (item_el.Contains("串间距"))
                {
                    aiDefectStaticViewModel.ChuanJianJu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneChuanJianJu++;
                    }
                }
                if (item_vi.Contains("串间距"))
                {
                    aiDefectStaticViewModel.ChuanJianJu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneChuanJianJu++;
                    }
                }
                if (item_vB.Contains("串间距"))
                {
                    aiDefectStaticViewModel.ChuanJianJu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneChuanJianJu++;
                    }
                }
                // 缺角
                if (item_el.Contains("缺角"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                if (item_vi.Contains("缺角"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                if (item_vB.Contains("缺角"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                // 破片
                if (item_el.Contains("破片"))
                {
                    aiDefectStaticViewModel.PoPian++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePoPian++;
                    }
                }
                if (item_vi.Contains("破片"))
                {
                    aiDefectStaticViewModel.PoPian++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePoPian++;
                    }
                }
                if (item_vB.Contains("破片"))
                {
                    aiDefectStaticViewModel.PoPian++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePoPian++;
                    }
                }
                // 玻璃异物
                if (item_el.Contains("玻璃异物"))
                {
                    aiDefectStaticViewModel.BoLiYiWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBoLiYiWu++;
                    }
                }
                if (item_vi.Contains("玻璃异物"))
                {
                    aiDefectStaticViewModel.BoLiYiWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBoLiYiWu++;
                    }
                }
                if (item_vB.Contains("玻璃异物"))
                {
                    aiDefectStaticViewModel.BoLiYiWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBoLiYiWu++;
                    }
                }
                // 异物
                if (item_el.Contains("异物"))
                {
                    aiDefectStaticViewModel.YiWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiWu++;
                    }
                }
                if (item_vi.Contains("异物"))
                {
                    aiDefectStaticViewModel.YiWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiWu++;
                    }
                }
                if (item_vB.Contains("异物"))
                {
                    aiDefectStaticViewModel.YiWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiWu++;
                    }
                }
                /* 翻转检：硅胶脏污、POE残留、气泡、爆板、焊带偏移、电池片划伤、电池片破片、电池片异物、电池片脏污、条形码歪斜、条形码缺失、边缘玻璃异物、条码信息、膜偏移、电池片翘曲、连续气泡、鱼眼气泡、中孔气泡 */
                // 硅胶脏污
                if (item_el.Contains("硅胶脏污"))
                {
                    aiDefectStaticViewModel.GuiJiaoZangWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneGuiJiaoZangWu++;
                    }
                }
                if (item_vi.Contains("硅胶脏污"))
                {
                    aiDefectStaticViewModel.GuiJiaoZangWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneGuiJiaoZangWu++;
                    }
                }
                if (item_vB.Contains("硅胶脏污"))
                {
                    aiDefectStaticViewModel.GuiJiaoZangWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneGuiJiaoZangWu++;
                    }
                }
                // POE残留
                if (item_el.Contains("POE残留"))
                {
                    aiDefectStaticViewModel.POECanLiu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePOECanLiu++;
                    }
                }
                if (item_vi.Contains("POE残留"))
                {
                    aiDefectStaticViewModel.POECanLiu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePOECanLiu++;
                    }
                }
                if (item_vB.Contains("POE残留"))
                {
                    aiDefectStaticViewModel.POECanLiu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOnePOECanLiu++;
                    }
                }
                // 气泡（原代码Vi端判断为"1111"，保留原逻辑）
                if (item_el.Contains("气泡"))
                {
                    aiDefectStaticViewModel.QiPao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiPao++;
                    }
                }
                if (item_vi.Contains("气泡"))
                {
                    aiDefectStaticViewModel.QiPao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiPao++;
                    }
                }
                if (item_vB.Contains("气泡"))
                {
                    aiDefectStaticViewModel.QiPao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiPao++;
                    }
                }
                // 爆板
                if (item_el.Contains("爆板"))
                {
                    aiDefectStaticViewModel.BaoBan++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoBan++;
                    }
                }
                if (item_vi.Contains("爆板"))
                {
                    aiDefectStaticViewModel.BaoBan++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoBan++;
                    }
                }
                if (item_vB.Contains("爆板"))
                {
                    aiDefectStaticViewModel.BaoBan++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoBan++;
                    }
                }
                // 电池片划伤
                if (item_el.Contains("电池片划伤"))
                {
                    aiDefectStaticViewModel.DianChiPianHuaShang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianHuaShang++;
                    }
                }
                if (item_vi.Contains("电池片划伤"))
                {
                    aiDefectStaticViewModel.DianChiPianHuaShang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianHuaShang++;
                    }
                }
                if (item_vB.Contains("电池片划伤"))
                {
                    aiDefectStaticViewModel.DianChiPianHuaShang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianHuaShang++;
                    }
                }
                // 电池片破片
                if (item_el.Contains("电池片破片"))
                {
                    aiDefectStaticViewModel.DianChiPianPoPian++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianPoPian++;
                    }
                }
                if (item_vi.Contains("电池片破片"))
                {
                    aiDefectStaticViewModel.DianChiPianPoPian++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianPoPian++;
                    }
                }
                if (item_vB.Contains("电池片破片"))
                {
                    aiDefectStaticViewModel.DianChiPianPoPian++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianPoPian++;
                    }
                }
                // 电池片异物
                if (item_el.Contains("电池片异物"))
                {
                    aiDefectStaticViewModel.DianChiPianYiWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianYiWu++;
                    }
                }
                if (item_vi.Contains("电池片异物"))
                {
                    aiDefectStaticViewModel.DianChiPianYiWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianYiWu++;
                    }
                }
                if (item_vB.Contains("电池片异物"))
                {
                    aiDefectStaticViewModel.DianChiPianYiWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianYiWu++;
                    }
                }
                // 电池片脏污
                if (item_el.Contains("电池片脏污"))
                {
                    aiDefectStaticViewModel.DianChiPianZangWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianZangWu++;
                    }
                }
                if (item_vi.Contains("电池片脏污"))
                {
                    aiDefectStaticViewModel.DianChiPianZangWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianZangWu++;
                    }
                }
                if (item_vB.Contains("电池片脏污"))
                {
                    aiDefectStaticViewModel.DianChiPianZangWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianZangWu++;
                    }
                }
                // 条形码歪斜
                if (item_el.Contains("条形码歪斜"))
                {
                    aiDefectStaticViewModel.TiaoXingMaWaiXie++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaWaiXie++;
                    }
                }
                if (item_vi.Contains("条形码歪斜"))
                {
                    aiDefectStaticViewModel.TiaoXingMaWaiXie++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaWaiXie++;
                    }
                }
                if (item_vB.Contains("条形码歪斜"))
                {
                    aiDefectStaticViewModel.TiaoXingMaWaiXie++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaWaiXie++;
                    }
                }
                // 条形码缺失
                if (item_el.Contains("条形码缺失"))
                {
                    aiDefectStaticViewModel.TiaoXingMaQueShi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaQueShi++;
                    }
                }
                if (item_vi.Contains("条形码缺失"))
                {
                    aiDefectStaticViewModel.TiaoXingMaQueShi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaQueShi++;
                    }
                }
                if (item_vB.Contains("条形码缺失"))
                {
                    aiDefectStaticViewModel.TiaoXingMaQueShi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoXingMaQueShi++;
                    }
                }
                // 边缘玻璃异物
                if (item_el.Contains("边缘玻璃异物"))
                {
                    aiDefectStaticViewModel.BianYuanBoLiYiWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBianYuanBoLiYiWu++;
                    }
                }
                if (item_vi.Contains("边缘玻璃异物"))
                {
                    aiDefectStaticViewModel.BianYuanBoLiYiWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBianYuanBoLiYiWu++;
                    }
                }
                if (item_vB.Contains("边缘玻璃异物"))
                {
                    aiDefectStaticViewModel.BianYuanBoLiYiWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBianYuanBoLiYiWu++;
                    }
                }
                // 条码信息
                if (item_el.Contains("条码信息"))
                {
                    aiDefectStaticViewModel.TiaoMaXinXi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoMaXinXi++;
                    }
                }
                if (item_vi.Contains("条码信息"))
                {
                    aiDefectStaticViewModel.TiaoMaXinXi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoMaXinXi++;
                    }
                }
                if (item_vB.Contains("条码信息"))
                {
                    aiDefectStaticViewModel.TiaoMaXinXi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneTiaoMaXinXi++;
                    }
                }
                // 膜偏移
                if (item_el.Contains("膜偏移"))
                {
                    aiDefectStaticViewModel.MoPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMoPianYi++;
                    }
                }
                if (item_vi.Contains("膜偏移"))
                {
                    aiDefectStaticViewModel.MoPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMoPianYi++;
                    }
                }
                if (item_vB.Contains("膜偏移"))
                {
                    aiDefectStaticViewModel.MoPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMoPianYi++;
                    }
                }
                // 电池片翘曲
                if (item_el.Contains("电池片翘曲"))
                {
                    aiDefectStaticViewModel.DianChiPianQiaoQu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianQiaoQu++;
                    }
                }
                if (item_vi.Contains("电池片翘曲"))
                {
                    aiDefectStaticViewModel.DianChiPianQiaoQu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianQiaoQu++;
                    }
                }
                if (item_vB.Contains("电池片翘曲"))
                {
                    aiDefectStaticViewModel.DianChiPianQiaoQu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDianChiPianQiaoQu++;
                    }
                }
                // 连续气泡
                if (item_el.Contains("连续气泡"))
                {
                    aiDefectStaticViewModel.LianXuQiPao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLianXuQiPao++;
                    }
                }
                if (item_vi.Contains("连续气泡"))
                {
                    aiDefectStaticViewModel.LianXuQiPao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLianXuQiPao++;
                    }
                }
                if (item_vB.Contains("连续气泡"))
                {
                    aiDefectStaticViewModel.LianXuQiPao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLianXuQiPao++;
                    }
                }
                // 鱼眼气泡
                if (item_el.Contains("鱼眼气泡"))
                {
                    aiDefectStaticViewModel.YuYanQiPao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYuYanQiPao++;
                    }
                }
                if (item_vi.Contains("鱼眼气泡"))
                {
                    aiDefectStaticViewModel.YuYanQiPao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYuYanQiPao++;
                    }
                }
                if (item_vB.Contains("鱼眼气泡"))
                {
                    aiDefectStaticViewModel.YuYanQiPao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYuYanQiPao++;
                    }
                }
                // 中孔气泡
                if (item_el.Contains("中孔气泡"))
                {
                    aiDefectStaticViewModel.ZhongKongQiPao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhongKongQiPao++;
                    }
                }
                if (item_vi.Contains("中孔气泡"))
                {
                    aiDefectStaticViewModel.ZhongKongQiPao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhongKongQiPao++;
                    }
                }
                if (item_vB.Contains("中孔气泡"))
                {
                    aiDefectStaticViewModel.ZhongKongQiPao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhongKongQiPao++;
                    }
                }

                /* 灌胶检：溢胶、缺胶、引出线外漏、滴胶 */
                // 溢胶
                if (item_el.Contains("溢胶"))
                {
                    aiDefectStaticViewModel.YiJiao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiJiao++;
                    }
                }
                if (item_vi.Contains("溢胶"))
                {
                    aiDefectStaticViewModel.YiJiao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiJiao++;
                    }
                }
                if (item_vB.Contains("溢胶"))
                {
                    aiDefectStaticViewModel.YiJiao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYiJiao++;
                    }
                }
                // 缺胶（原代码注释含该缺陷，补充对应判断）
                if (item_el.Contains("缺胶"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                if (item_vi.Contains("缺胶"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                if (item_vB.Contains("缺胶"))
                {
                    aiDefectStaticViewModel.QueJiao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQueJiao++;
                    }
                }
                // 引出线外漏
                if (item_el.Contains("引出线外漏"))
                {
                    aiDefectStaticViewModel.YinChuXianWaiLou++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYinChuXianWaiLou++;
                    }
                }
                if (item_vi.Contains("引出线外漏"))
                {
                    aiDefectStaticViewModel.YinChuXianWaiLou++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYinChuXianWaiLou++;
                    }
                }
                if (item_vB.Contains("引出线外漏"))
                {
                    aiDefectStaticViewModel.YinChuXianWaiLou++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneYinChuXianWaiLou++;
                    }
                }
                // 滴胶 
                if (item_el.Contains("滴胶"))
                {
                    aiDefectStaticViewModel.DiJiao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDiJiao++;
                    }
                }
                if (item_vi.Contains("滴胶"))
                {
                    aiDefectStaticViewModel.DiJiao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDiJiao++;
                    }
                }
                if (item_vB.Contains("滴胶"))
                {
                    aiDefectStaticViewModel.DiJiao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDiJiao++;
                    }
                }

                /* 角缝检：角缝异常、脏污、溢胶、划伤、其它 */
                // 角缝异常
                if (item_el.Contains("角缝异常"))
                {
                    aiDefectStaticViewModel.JiaoFengYiChang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoFengYiChang++;
                    }
                }
                if (item_vi.Contains("角缝异常"))
                {
                    aiDefectStaticViewModel.JiaoFengYiChang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoFengYiChang++;
                    }
                }
                if (item_vB.Contains("角缝异常"))
                {
                    aiDefectStaticViewModel.JiaoFengYiChang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoFengYiChang++;
                    }
                }
                // 脏污
                if (item_el.Contains("脏污"))
                {
                    aiDefectStaticViewModel.ZangWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZangWu++;
                    }
                }
                if (item_vi.Contains("脏污"))
                {
                    aiDefectStaticViewModel.ZangWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZangWu++;
                    }
                }
                if (item_vB.Contains("脏污"))
                {
                    aiDefectStaticViewModel.ZangWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZangWu++;
                    }
                }
                // 划伤
                if (item_el.Contains("划伤"))
                {
                    aiDefectStaticViewModel.HuaShang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuaShang++;
                    }
                }
                if (item_vi.Contains("划伤"))
                {
                    aiDefectStaticViewModel.HuaShang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuaShang++;
                    }
                }
                if (item_vB.Contains("划伤"))
                {
                    aiDefectStaticViewModel.HuaShang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneHuaShang++;
                    }
                }
                // 其它
                if (item_el.Contains("其它"))
                {
                    aiDefectStaticViewModel.QiTa++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiTa++;
                    }
                }
                if (item_vi.Contains("其它"))
                {
                    aiDefectStaticViewModel.QiTa++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiTa++;
                    }
                }
                if (item_vB.Contains("其它"))
                {
                    aiDefectStaticViewModel.QiTa++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneQiTa++;
                    }
                }

                /* 边框胶线检：脏污、划伤、缺胶、卷边、断胶、气泡、胶线异物 */
                // 卷边
                if (item_el.Contains("卷边"))
                {
                    aiDefectStaticViewModel.JuanBian++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJuanBian++;
                    }
                }
                if (item_vi.Contains("卷边"))
                {
                    aiDefectStaticViewModel.JuanBian++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJuanBian++;
                    }
                }
                if (item_vB.Contains("卷边"))
                {
                    aiDefectStaticViewModel.JuanBian++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJuanBian++;
                    }
                }
                // 断胶
                if (item_el.Contains("断胶"))
                {
                    aiDefectStaticViewModel.DuanJiao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuanJiao++;
                    }
                }
                if (item_vi.Contains("断胶"))
                {
                    aiDefectStaticViewModel.DuanJiao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuanJiao++;
                    }
                }
                if (item_vB.Contains("断胶"))
                {
                    aiDefectStaticViewModel.DuanJiao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuanJiao++;
                    }
                }
                // 胶线异物
                if (item_el.Contains("胶线异物"))
                {
                    aiDefectStaticViewModel.JiaoXianYiWu++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoXianYiWu++;
                    }
                }
                if (item_vi.Contains("胶线异物"))
                {
                    aiDefectStaticViewModel.JiaoXianYiWu++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoXianYiWu++;
                    }
                }
                if (item_vB.Contains("胶线异物"))
                {
                    aiDefectStaticViewModel.JiaoXianYiWu++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJiaoXianYiWu++;
                    }
                }

                /* 装框正面检：片间距、串间距、崩边、缺角、破片、脏污、划伤、爆件 */
                // 崩边
                if (item_el.Contains("崩边"))
                {
                    aiDefectStaticViewModel.BengBian++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBengBian++;
                    }
                }
                if (item_vi.Contains("崩边"))
                {
                    aiDefectStaticViewModel.BengBian++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBengBian++;
                    }
                }
                if (item_vB.Contains("崩边"))
                {
                    aiDefectStaticViewModel.BengBian++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBengBian++;
                    }
                }
                // 爆件
                if (item_el.Contains("爆件"))
                {
                    aiDefectStaticViewModel.BaoJian++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoJian++;
                    }
                }
                if (item_vi.Contains("爆件"))
                {
                    aiDefectStaticViewModel.BaoJian++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoJian++;
                    }
                }
                if (item_vB.Contains("爆件"))
                {
                    aiDefectStaticViewModel.BaoJian++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneBaoJian++;
                    }
                }

                /* 铭牌检：铭牌缺失、铭牌歪斜、铭牌气泡、铭牌褶皱、整体偏移、参数偏移、多铭牌、参数缺失 */
                // 铭牌缺失
                if (item_el.Contains("铭牌缺失"))
                {
                    aiDefectStaticViewModel.MingPaiQueShi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQueShi++;
                    }
                }
                if (item_vi.Contains("铭牌缺失"))
                {
                    aiDefectStaticViewModel.MingPaiQueShi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQueShi++;
                    }
                }
                if (item_vB.Contains("铭牌缺失"))
                {
                    aiDefectStaticViewModel.MingPaiQueShi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQueShi++;
                    }
                }
                // 铭牌歪斜
                if (item_el.Contains("铭牌歪斜"))
                {
                    aiDefectStaticViewModel.MingPaiWaiXie++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiWaiXie++;
                    }
                }
                if (item_vi.Contains("铭牌歪斜"))
                {
                    aiDefectStaticViewModel.MingPaiWaiXie++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiWaiXie++;
                    }
                }
                if (item_vB.Contains("铭牌歪斜"))
                {
                    aiDefectStaticViewModel.MingPaiWaiXie++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiWaiXie++;
                    }
                }
                // 铭牌气泡
                if (item_el.Contains("铭牌气泡"))
                {
                    aiDefectStaticViewModel.MingPaiQiPao++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQiPao++;
                    }
                }
                if (item_vi.Contains("铭牌气泡"))
                {
                    aiDefectStaticViewModel.MingPaiQiPao++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQiPao++;
                    }
                }
                if (item_vB.Contains("铭牌气泡"))
                {
                    aiDefectStaticViewModel.MingPaiQiPao++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiQiPao++;
                    }
                }
                // 处理铭牌褶皱
                if (item_el.Contains("铭牌褶皱"))
                {
                    aiDefectStaticViewModel.MingPaiZhouZhe++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiZhouZhe++;
                    }
                }
                if (item_vi.Contains("铭牌褶皱"))
                {
                    aiDefectStaticViewModel.MingPaiZhouZhe++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiZhouZhe++;
                    }
                }
                if (item_vB.Contains("铭牌褶皱"))
                {
                    aiDefectStaticViewModel.MingPaiZhouZhe++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneMingPaiZhouZhe++;
                    }
                }
                // 处理整体偏移
                if (item_el.Contains("整体偏移"))
                {
                    aiDefectStaticViewModel.ZhengTiPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhengTiPianYi++;
                    }
                }
                if (item_vi.Contains("整体偏移"))
                {
                    aiDefectStaticViewModel.ZhengTiPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhengTiPianYi++;
                    }
                }
                if (item_vB.Contains("整体偏移"))
                {
                    aiDefectStaticViewModel.ZhengTiPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneZhengTiPianYi++;
                    }
                }
                // 处理参数偏移
                if (item_el.Contains("参数偏移"))
                {
                    aiDefectStaticViewModel.CanShuPianYi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuPianYi++;
                    }
                }
                if (item_vi.Contains("参数偏移"))
                {
                    aiDefectStaticViewModel.CanShuPianYi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuPianYi++;
                    }
                }
                if (item_vB.Contains("参数偏移"))
                {
                    aiDefectStaticViewModel.CanShuPianYi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuPianYi++;
                    }
                }
                // 处理多铭牌
                if (item_el.Contains("多铭牌"))
                {
                    aiDefectStaticViewModel.DuoMingPai++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuoMingPai++;
                    }
                }
                if (item_vi.Contains("多铭牌"))
                {
                    aiDefectStaticViewModel.DuoMingPai++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuoMingPai++;
                    }
                }
                if (item_vB.Contains("多铭牌"))
                {
                    aiDefectStaticViewModel.DuoMingPai++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneDuoMingPai++;
                    }
                }
                // 处理参数缺失
                if (item_el.Contains("参数缺失"))
                {
                    aiDefectStaticViewModel.CanShuQueShi++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuQueShi++;
                    }
                }
                if (item_vi.Contains("参数缺失"))
                {
                    aiDefectStaticViewModel.CanShuQueShi++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuQueShi++;
                    }
                }
                if (item_vB.Contains("参数缺失"))
                {
                    aiDefectStaticViewModel.CanShuQueShi++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneCanShuQueShi++;
                    }
                }
                /*
                 终检线扫
                接线盒未盖
                气泡
                硅胶脏污
                POE残留
                漏工装
                滴胶
                溢胶
                */

                // 处理接线盒未盖
                if (item_el.Contains("接线盒未盖"))
                {
                    aiDefectStaticViewModel.JieXianHeWeiGai++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJieXianHeWeiGai++;
                    }
                }
                if (item_vi.Contains("接线盒未盖"))
                {
                    aiDefectStaticViewModel.JieXianHeWeiGai++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJieXianHeWeiGai++;
                    }
                }
                if (item_vB.Contains("接线盒未盖"))
                {
                    aiDefectStaticViewModel.JieXianHeWeiGai++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneJieXianHeWeiGai++;
                    }
                }
                // 处理漏工装
                if (item_el.Contains("漏工装"))
                {
                    aiDefectStaticViewModel.LouGongZhuang++;
                    if (!xiangshu.ElAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLouGongZhuang++;
                    }
                }
                if (item_vi.Contains("漏工装"))
                {
                    aiDefectStaticViewModel.LouGongZhuang++;
                    if (!xiangshu.ViAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLouGongZhuang++;
                    }
                }
                if (item_vB.Contains("漏工装"))
                {
                    aiDefectStaticViewModel.LouGongZhuang++;
                    if (!xiangshu.VBAiDetectInfo.Contains(","))
                    {
                        aiDefectStaticViewModel.OnlyOneLouGongZhuang++;
                    }
                }
            }

                    //第二步，误检数据=>过判的el和ai的检测数据
                    var loujianWupan = heBingReport.Where(x => x.LouJianOrGuopan!=null&& x.LouJianOrGuopan.Equals("过判"));
            foreach (var itemTwo in loujianWupan) 
            {
                /*
      汇流条检
焊带偏移,焊带过长,焊带过短,焊带缺失,焊带虚焊,   焊带弯曲 , 汇流条缺失, 汇流条偏移      ,爬电距离,焊带异常,EVA膜偏移
焊带未焊接
方阵偏移
      */
                var itemTwo_el = itemTwo.ElAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                var itemTwo_vi = itemTwo.ViAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                var itemTwo_vB = itemTwo.VBAiDetectInfo.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);

                // 焊带偏移
                if (itemTwo_el.Contains("焊带偏移") || itemTwo_vi.Contains("焊带偏移"))
                {
                    aiDefectStaticViewModel.HanDaiPianYi_1++;
                }
                if (itemTwo_vB.Contains("焊带偏移"))
                {
                    aiDefectStaticViewModel.HanDaiPianYi_1++;
                }

                // 焊带过长
                if (itemTwo_el.Contains("焊带过长") || itemTwo_vi.Contains("焊带过长"))
                {
                    aiDefectStaticViewModel.HanDaiGuoChang_1++;
                }
                if (itemTwo_vB.Contains("焊带过长"))
                {
                    aiDefectStaticViewModel.HanDaiGuoChang_1++;
                }

                // 焊带过短
                if (itemTwo_el.Contains("焊带过短") || itemTwo_vi.Contains("焊带过短"))
                {
                    aiDefectStaticViewModel.HanDaiGuoDuan_1++;
                }
                if (itemTwo_vB.Contains("焊带过短"))
                {
                    aiDefectStaticViewModel.HanDaiGuoDuan_1++;
                }

                // 焊带缺失
                if (itemTwo_el.Contains("焊带缺失") || itemTwo_vi.Contains("焊带缺失"))
                {
                    aiDefectStaticViewModel.HanDaiQueShi_1++;
                }
                if (itemTwo_vB.Contains("焊带缺失"))
                {
                    aiDefectStaticViewModel.HanDaiQueShi_1++;
                }

                // 焊带虚焊
                if (itemTwo_el.Contains("焊带虚焊") || itemTwo_vi.Contains("焊带虚焊"))
                {
                    aiDefectStaticViewModel.HanDaiXuHan_1++;
                }
                if (itemTwo_vB.Contains("焊带虚焊"))
                {
                    aiDefectStaticViewModel.HanDaiXuHan_1++;
                }

                // 焊带弯曲
                if (itemTwo_el.Contains("焊带弯曲") || itemTwo_vi.Contains("焊带弯曲"))
                {
                    aiDefectStaticViewModel.HanDaiWanQu_1++;
                }
                if (itemTwo_vB.Contains("焊带弯曲"))
                {
                    aiDefectStaticViewModel.HanDaiWanQu_1++;
                }

                // 汇流条缺失
                if (itemTwo_el.Contains("汇流条缺失") || itemTwo_vi.Contains("汇流条缺失"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoQueShi_1++;
                }
                if (itemTwo_vB.Contains("汇流条缺失"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoQueShi_1++;
                }

                // 汇流条偏移
                if (itemTwo_el.Contains("汇流条偏移") || itemTwo_vi.Contains("汇流条偏移"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoPianYi_1++;
                }
                if (itemTwo_vB.Contains("汇流条偏移"))
                {
                    aiDefectStaticViewModel.HuiLiuTiaoPianYi_1++;
                }

                // 爬电距离
                if (itemTwo_el.Contains("爬电距离") || itemTwo_vi.Contains("爬电距离"))
                {
                    aiDefectStaticViewModel.PaDianJuLi_1++;
                }
                if (itemTwo_vB.Contains("爬电距离"))
                {
                    aiDefectStaticViewModel.PaDianJuLi_1++;
                }

                // 焊带异常
                if (itemTwo_el.Contains("焊带异常") || itemTwo_vi.Contains("焊带异常"))
                {
                    aiDefectStaticViewModel.HanDaiYiChang_1++;
                }
                if (itemTwo_vB.Contains("焊带异常"))
                {
                    aiDefectStaticViewModel.HanDaiYiChang_1++;
                }

                // EVA膜偏移
                if (itemTwo_el.Contains("EVA膜偏移") || itemTwo_vi.Contains("EVA膜偏移"))
                {
                    aiDefectStaticViewModel.EVAMoPianYi_1++;
                }
                if (itemTwo_vB.Contains("EVA膜偏移"))
                {
                    aiDefectStaticViewModel.EVAMoPianYi_1++;
                }

                // 焊带未焊接
                if (itemTwo_el.Contains("焊带未焊接") || itemTwo_vi.Contains("焊带未焊接"))
                {
                    aiDefectStaticViewModel.HanDaiWeiHanJie_1++;
                }
                if (itemTwo_vB.Contains("焊带未焊接"))
                {
                    aiDefectStaticViewModel.HanDaiWeiHanJie_1++;
                }

                // 方阵偏移
                if (itemTwo_el.Contains("方阵偏移") || itemTwo_vi.Contains("方阵偏移"))
                {
                    aiDefectStaticViewModel.FangZhenPianYi_1++;
                }
                if (itemTwo_vB.Contains("方阵偏移"))
                {
                    aiDefectStaticViewModel.FangZhenPianYi_1++;
                }


                // -------------- 叠焊背面检 --------------
                /*
                 叠焊背面检：片间距、串间距、缺角、破片、焊带偏移、玻璃异物、异物
                 */

                // 片间距
                if (itemTwo_el.Contains("片间距") || itemTwo_vi.Contains("片间距"))
                {
                    aiDefectStaticViewModel.PianJianJu_1++;
                }
                if (itemTwo_vB.Contains("片间距"))
                {
                    aiDefectStaticViewModel.PianJianJu_1++;
                }

                // 串间距
                if (itemTwo_el.Contains("串间距") || itemTwo_vi.Contains("串间距"))
                {
                    aiDefectStaticViewModel.ChuanJianJu_1++;
                }
                if (itemTwo_vB.Contains("串间距"))
                {
                    aiDefectStaticViewModel.ChuanJianJu_1++;
                }

                // 缺角
                if (itemTwo_el.Contains("缺角") || itemTwo_vi.Contains("缺角"))
                {
                    aiDefectStaticViewModel.QueJiao_1++;
                }
                if (itemTwo_vB.Contains("缺角"))
                {
                    aiDefectStaticViewModel.QueJiao_1++;
                }

                // 破片
                if (itemTwo_el.Contains("破片") || itemTwo_vi.Contains("破片"))
                {
                    aiDefectStaticViewModel.PoPian_1++;
                }
                if (itemTwo_vB.Contains("破片"))
                {
                    aiDefectStaticViewModel.PoPian_1++;
                }

                // 玻璃异物（叠焊背面检）
                if (itemTwo_el.Contains("玻璃异物") || itemTwo_vi.Contains("玻璃异物"))
                {
                    aiDefectStaticViewModel.BoLiYiWu_1++;
                }
                if (itemTwo_vB.Contains("玻璃异物"))
                {
                    aiDefectStaticViewModel.BoLiYiWu_1++;
                }

                // 异物（叠焊背面检）
                if (itemTwo_el.Contains("异物") || itemTwo_vi.Contains("异物"))
                {
                    aiDefectStaticViewModel.YiWu_1++;
                }
                if (itemTwo_vB.Contains("异物"))
                {
                    aiDefectStaticViewModel.YiWu_1++;
                }


                /*
                 翻转检：
                 硅胶脏污,POE残留,气泡,爆板,焊带偏移,电池片划伤
                 电池片破片
                 电池片异物
                 电池片脏污 
                 条形码歪斜
                 条形码缺失
                 边缘玻璃异物
                 条码信息
                 膜偏移
                 电池片翘曲
                 连续气泡
                 鱼眼气泡
                 中孔气泡
                 */
                

                // 硅胶脏污
                if (itemTwo_el.Contains("硅胶脏污") || itemTwo_vi.Contains("硅胶脏污"))
                {
                    aiDefectStaticViewModel.GuiJiaoZangWu_1++;
                }
                if (itemTwo_vB.Contains("硅胶脏污"))
                {
                    aiDefectStaticViewModel.GuiJiaoZangWu_1++;
                }

                // POE残留
                if (itemTwo_el.Contains("POE残留") || itemTwo_vi.Contains("POE残留"))
                {
                    aiDefectStaticViewModel.POECanLiu_1++;
                }
                if (itemTwo_vB.Contains("POE残留"))
                {
                    aiDefectStaticViewModel.POECanLiu_1++;
                }

                // 气泡
                if (itemTwo_el.Contains("气泡") || itemTwo_vi.Contains("气泡"))
                {
                    aiDefectStaticViewModel.QiPao_1++;
                }
                if (itemTwo_vB.Contains("气泡"))
                {
                    aiDefectStaticViewModel.QiPao_1++;
                }

                // 爆板
                if (itemTwo_el.Contains("爆板") || itemTwo_vi.Contains("爆板"))
                {
                    aiDefectStaticViewModel.BaoBan_1++;
                }
                if (itemTwo_vB.Contains("爆板"))
                {
                    aiDefectStaticViewModel.BaoBan_1++;
                }

                // 电池片划伤
                if (itemTwo_el.Contains("电池片划伤") || itemTwo_vi.Contains("电池片划伤"))
                {
                    aiDefectStaticViewModel.DianChiPianHuaShang_1++;
                }
                if (itemTwo_vB.Contains("电池片划伤"))
                {
                    aiDefectStaticViewModel.DianChiPianHuaShang_1++;
                }

                // 电池片破片
                if (itemTwo_el.Contains("电池片破片") || itemTwo_vi.Contains("电池片破片"))
                {
                    aiDefectStaticViewModel.DianChiPianPoPian_1++;
                }
                if (itemTwo_vB.Contains("电池片破片"))
                {
                    aiDefectStaticViewModel.DianChiPianPoPian_1++;
                }

                // 电池片异物
                if (itemTwo_el.Contains("电池片异物") || itemTwo_vi.Contains("电池片异物"))
                {
                    aiDefectStaticViewModel.DianChiPianYiWu_1++;
                }
                if (itemTwo_vB.Contains("电池片异物"))
                {
                    aiDefectStaticViewModel.DianChiPianYiWu_1++;
                }

                // 电池片脏污
                if (itemTwo_el.Contains("电池片脏污") || itemTwo_vi.Contains("电池片脏污"))
                {
                    aiDefectStaticViewModel.DianChiPianZangWu_1++;
                }
                if (itemTwo_vB.Contains("电池片脏污"))
                {
                    aiDefectStaticViewModel.DianChiPianZangWu_1++;
                }

                // 条形码歪斜
                if (itemTwo_el.Contains("条形码歪斜") || itemTwo_vi.Contains("条形码歪斜"))
                {
                    aiDefectStaticViewModel.TiaoXingMaWaiXie_1++;
                }
                if (itemTwo_vB.Contains("条形码歪斜"))
                {
                    aiDefectStaticViewModel.TiaoXingMaWaiXie_1++;
                }

                // 条形码缺失
                if (itemTwo_el.Contains("条形码缺失") || itemTwo_vi.Contains("条形码缺失"))
                {
                    aiDefectStaticViewModel.TiaoXingMaQueShi_1++;
                }
                if (itemTwo_vB.Contains("条形码缺失"))
                {
                    aiDefectStaticViewModel.TiaoXingMaQueShi_1++;
                }

                // 边缘玻璃异物
                if (itemTwo_el.Contains("边缘玻璃异物") || itemTwo_vi.Contains("边缘玻璃异物"))
                {
                    aiDefectStaticViewModel.BianYuanBoLiYiWu_1++;
                }
                if (itemTwo_vB.Contains("边缘玻璃异物"))
                {
                    aiDefectStaticViewModel.BianYuanBoLiYiWu_1++;
                }

                // 条码信息
                if (itemTwo_el.Contains("条码信息") || itemTwo_vi.Contains("条码信息"))
                {
                    aiDefectStaticViewModel.TiaoMaXinXi_1++;
                }
                if (itemTwo_vB.Contains("条码信息"))
                {
                    aiDefectStaticViewModel.TiaoMaXinXi_1++;
                }

                // 膜偏移
                if (itemTwo_el.Contains("膜偏移") || itemTwo_vi.Contains("膜偏移"))
                {
                    aiDefectStaticViewModel.MoPianYi_1++;
                }
                if (itemTwo_vB.Contains("膜偏移"))
                {
                    aiDefectStaticViewModel.MoPianYi_1++;
                }

                // 电池片翘曲
                if (itemTwo_el.Contains("电池片翘曲") || itemTwo_vi.Contains("电池片翘曲"))
                {
                    aiDefectStaticViewModel.DianChiPianQiaoQu_1++;
                }
                if (itemTwo_vB.Contains("电池片翘曲"))
                {
                    aiDefectStaticViewModel.DianChiPianQiaoQu_1++;
                }

                // 连续气泡
                if (itemTwo_el.Contains("连续气泡") || itemTwo_vi.Contains("连续气泡"))
                {
                    aiDefectStaticViewModel.LianXuQiPao_1++;
                }
                if (itemTwo_vB.Contains("连续气泡"))
                {
                    aiDefectStaticViewModel.LianXuQiPao_1++;
                }

                // 鱼眼气泡
                if (itemTwo_el.Contains("鱼眼气泡") || itemTwo_vi.Contains("鱼眼气泡"))
                {
                    aiDefectStaticViewModel.YuYanQiPao_1++;
                }
                if (itemTwo_vB.Contains("鱼眼气泡"))
                {
                    aiDefectStaticViewModel.YuYanQiPao_1++;
                }

                // 中孔气泡
                if (itemTwo_el.Contains("中孔气泡") || itemTwo_vi.Contains("中孔气泡"))
                {
                    aiDefectStaticViewModel.ZhongKongQiPao_1++;
                }
                if (itemTwo_vB.Contains("中孔气泡"))
                {
                    aiDefectStaticViewModel.ZhongKongQiPao_1++;
                }

                // 溢胶
                if (itemTwo_el.Contains("溢胶") || itemTwo_vi.Contains("溢胶"))
                {
                    aiDefectStaticViewModel.YiJiao_1++;
                }
                if (itemTwo_vB.Contains("溢胶"))
                {
                    aiDefectStaticViewModel.YiJiao_1++;
                }

                // 引出线外漏
                if (itemTwo_el.Contains("引出线外漏") || itemTwo_vi.Contains("引出线外漏"))
                {
                    aiDefectStaticViewModel.YinChuXianWaiLou_1++;
                }
                if (itemTwo_vB.Contains("引出线外漏"))
                {
                    aiDefectStaticViewModel.YinChuXianWaiLou_1++;
                }

                // 滴胶
                if (itemTwo_el.Contains("滴胶") || itemTwo_vi.Contains("滴胶"))
                {
                    aiDefectStaticViewModel.DiJiao_1++;
                }
                if (itemTwo_vB.Contains("滴胶"))
                {
                    aiDefectStaticViewModel.DiJiao_1++;
                }

                // 角缝异常
                if (itemTwo_el.Contains("角缝异常") || itemTwo_vi.Contains("角缝异常"))
                {
                    aiDefectStaticViewModel.JiaoFengYiChang_1++;
                }
                if (itemTwo_vB.Contains("角缝异常"))
                {
                    aiDefectStaticViewModel.JiaoFengYiChang_1++;
                }

                // 脏污
                if (itemTwo_el.Contains("脏污") || itemTwo_vi.Contains("脏污"))
                {
                    aiDefectStaticViewModel.ZangWu_1++;
                }
                if (itemTwo_vB.Contains("脏污"))
                {
                    aiDefectStaticViewModel.ZangWu_1++;
                }

                // 划伤
                if (itemTwo_el.Contains("划伤") || itemTwo_vi.Contains("划伤"))
                {
                    aiDefectStaticViewModel.HuaShang_1++;
                }
                if (itemTwo_vB.Contains("划伤"))
                {
                    aiDefectStaticViewModel.HuaShang_1++;
                }

                // 其它
                if (itemTwo_el.Contains("其它") || itemTwo_vi.Contains("其它"))
                {
                    aiDefectStaticViewModel.QiTa_1++;
                }
                if (itemTwo_vB.Contains("其它"))
                {
                    aiDefectStaticViewModel.QiTa_1++;
                }

                // 卷边
                if (itemTwo_el.Contains("卷边") || itemTwo_vi.Contains("卷边"))
                {
                    aiDefectStaticViewModel.JuanBian_1++;
                }
                if (itemTwo_vB.Contains("卷边"))
                {
                    aiDefectStaticViewModel.JuanBian_1++;
                }

                // 断胶
                if (itemTwo_el.Contains("断胶") || itemTwo_vi.Contains("断胶"))
                {
                    aiDefectStaticViewModel.DuanJiao_1++;
                }
                if (itemTwo_vB.Contains("断胶"))
                {
                    aiDefectStaticViewModel.DuanJiao_1++;
                }

                // 胶线异物
                if (itemTwo_el.Contains("胶线异物") || itemTwo_vi.Contains("胶线异物"))
                {
                    aiDefectStaticViewModel.JiaoXianYiWu_1++;
                }
                if (itemTwo_vB.Contains("胶线异物"))
                {
                    aiDefectStaticViewModel.JiaoXianYiWu_1++;
                }

                // 崩边
                if (itemTwo_el.Contains("崩边") || itemTwo_vi.Contains("崩边"))
                {
                    aiDefectStaticViewModel.BengBian_1++;
                }
                if (itemTwo_vB.Contains("崩边"))
                {
                    aiDefectStaticViewModel.BengBian_1++;
                }

                // 爆件
                if (itemTwo_el.Contains("爆件") || itemTwo_vi.Contains("爆件"))
                {
                    aiDefectStaticViewModel.BaoJian_1++;
                }
                if (itemTwo_vB.Contains("爆件"))
                {
                    aiDefectStaticViewModel.BaoJian_1++;
                }

                // 铭牌缺失
                if (itemTwo_el.Contains("铭牌缺失") || itemTwo_vi.Contains("铭牌缺失"))
                {
                    aiDefectStaticViewModel.MingPaiQueShi_1++;
                }
                if (itemTwo_vB.Contains("铭牌缺失"))
                {
                    aiDefectStaticViewModel.MingPaiQueShi_1++;
                }

                // 铭牌歪斜
                if (itemTwo_el.Contains("铭牌歪斜") || itemTwo_vi.Contains("铭牌歪斜"))
                {
                    aiDefectStaticViewModel.MingPaiWaiXie_1++;
                }
                if (itemTwo_vB.Contains("铭牌歪斜"))
                {
                    aiDefectStaticViewModel.MingPaiWaiXie_1++;
                }

                // 铭牌气泡
                if (itemTwo_el.Contains("铭牌气泡") || itemTwo_vi.Contains("铭牌气泡"))
                {
                    aiDefectStaticViewModel.MingPaiQiPao_1++;
                }
                if (itemTwo_vB.Contains("铭牌气泡"))
                {
                    aiDefectStaticViewModel.MingPaiQiPao_1++;
                }

                // 铭牌褶皱
                if (itemTwo_el.Contains("铭牌褶皱") || itemTwo_vi.Contains("铭牌褶皱"))
                {
                    aiDefectStaticViewModel.MingPaiZhouZhe_1++;
                }
                if (itemTwo_vB.Contains("铭牌褶皱"))
                {
                    aiDefectStaticViewModel.MingPaiZhouZhe_1++;
                }

                // 整体偏移
                if (itemTwo_el.Contains("整体偏移") || itemTwo_vi.Contains("整体偏移"))
                {
                    aiDefectStaticViewModel.ZhengTiPianYi_1++;
                }
                if (itemTwo_vB.Contains("整体偏移"))
                {
                    aiDefectStaticViewModel.ZhengTiPianYi_1++;
                }

                // 参数偏移
                if (itemTwo_el.Contains("参数偏移") || itemTwo_vi.Contains("参数偏移"))
                {
                    aiDefectStaticViewModel.CanShuPianYi_1++;
                }
                if (itemTwo_vB.Contains("参数偏移"))
                {
                    aiDefectStaticViewModel.CanShuPianYi_1++;
                }

                // 多铭牌
                if (itemTwo_el.Contains("多铭牌") || itemTwo_vi.Contains("多铭牌"))
                {
                    aiDefectStaticViewModel.DuoMingPai_1++;
                }
                if (itemTwo_vB.Contains("多铭牌"))
                {
                    aiDefectStaticViewModel.DuoMingPai_1++;
                }

                // 参数缺失
                if (itemTwo_el.Contains("参数缺失") || itemTwo_vi.Contains("参数缺失"))
                {
                    aiDefectStaticViewModel.CanShuQueShi_1++;
                }
                if (itemTwo_vB.Contains("参数缺失"))
                {
                    aiDefectStaticViewModel.CanShuQueShi_1++;
                }

                // 接线盒未盖
                if (itemTwo_el.Contains("接线盒未盖") || itemTwo_vi.Contains("接线盒未盖"))
                {
                    aiDefectStaticViewModel.JieXianHeWeiGai_1++;
                }
                if (itemTwo_vB.Contains("接线盒未盖"))
                {
                    aiDefectStaticViewModel.JieXianHeWeiGai_1++;
                }

                // 漏工装
                if (itemTwo_el.Contains("漏工装") || itemTwo_vi.Contains("漏工装"))
                {
                    aiDefectStaticViewModel.LouGongZhuang_1++;
                }
                if (itemTwo_vB.Contains("漏工装"))
                {
                    aiDefectStaticViewModel.LouGongZhuang_1++;
                }

            }

            return aiDefectStaticViewModel;
        }
    }
}
